﻿using Reactive.Bindings;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using WPF_ReactiveProperty_PathSearchUtil.Models;
using WPF_ReactiveProperty_PathSearchUtil.Util;

namespace WPF_ReactiveProperty_PathSearchUtil.Service
{
    public interface MainWindowService
    {
        /// <summary>
        /// 抽出
        /// </summary>
        /// <param name="fileList"></param>
        /// <param name="searchPath"></param>
        /// <param name="isChecked"></param>
        /// <returns></returns>
        Resp WithdrawPath(ReactiveCollection<FileInfoModel> fileList,string searchPath,bool isChecked);

        /// <summary>
        /// 检索
        /// </summary>
        /// <param name="findResult"></param>
        /// <param name="fileList"></param>
        /// <param name="findWord"></param>
        /// <returns></returns>
        Resp Find(ReactiveCollection<int> findResult, ReactiveCollection<FileInfoModel> fileList, string findWord);

        /// <summary>
        /// 检索下一个
        /// </summary>
        /// <param name="findResult"></param>
        /// <param name="fileList"></param>
        /// <param name="findWord"></param>
        /// <param name="indexNow"></param>
        /// <returns></returns>
        Resp SearchNext(ReactiveCollection<int> findResult, ReactiveCollection<FileInfoModel> fileList, string findWord, int indexNow);

        /// <summary>
        /// 读取
        /// </summary>
        /// <param name="access"></param>
        /// <returns></returns>
        Resp ReadByServerOrLocal(CSVReadOrWrite access, ReactiveCollection<FileInfoModel> fileList);

        /// <summary>
        /// 导入
        /// </summary>
        /// <param name="access"></param>
        /// <param name="fileList"></param>
        /// <returns></returns>
        Resp WriteByServerOrLocal(CSVReadOrWrite access, ReactiveCollection<FileInfoModel> fileList);

        /// <summary>
        /// 排序
        /// </summary>
        /// <param name="fileList"></param>
        /// <param name="isDESC"></param>
        /// <param name="e"></param>
        Resp ToSort(ReactiveCollection<FileInfoModel> fileList, ref int[] isDESC, DataGridSortingEventArgs e);
    }
}
